package com.project.nimsen.util;

import java.util.regex.Pattern;

import org.apache.commons.lang.StringUtils;

public class ValdataUtil {
	/**
	 * 验证电话格式
	 * @param phone
	 * @return boolean
	 */
	public static boolean valphone(String phone){
		if(StringUtils.isBlank(phone))
			return false;
		return Pattern.matches("^1[3-8]+\\d{9}$",phone)||Pattern.matches("^((0\\d{2,3})-)(\\d{7,8})(-(\\d{3,}))?$",phone);
	}
}
